.class Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;
.super Landroid/os/AsyncTask;
.source "PreferencesActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/noshufou/android/su/preferences/PreferencesActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "UpdateVersions"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/Void;",
        "Ljava/lang/Integer;",
        "Ljava/lang/Integer;",
        ">;"
    }
.end annotation


# instance fields
.field private apkVersion:Ljava/lang/String;

.field private apkVersionCode:I

.field private binVersion:Ljava/lang/String;

.field final synthetic this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;


# direct methods
.method private constructor <init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 402
    iput-object p1, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    return-void
.end method

.method synthetic constructor <init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 402
    invoke-direct {p0, p1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;-><init>(Lcom/noshufou/android/su/preferences/PreferencesActivity;)V

    return-void
.end method


# virtual methods
.method protected varargs doInBackground([Ljava/lang/Void;)Ljava/lang/Integer;
    .locals 5
    .parameter "params"

    .prologue
    .line 410
    :try_start_0
    iget-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-virtual {v2}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v2

    .line 411
    iget-object v3, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    invoke-virtual {v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getPackageName()Ljava/lang/String;

    move-result-object v3

    const/16 v4, 0x80

    invoke-virtual {v2, v3, v4}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo;

    move-result-object v1

    .line 412
    .local v1, pInfo:Landroid/content/pm/PackageInfo;
    iget-object v2, v1, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String;

    iput-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->apkVersion:Ljava/lang/String;

    .line 413
    iget v2, v1, Landroid/content/pm/PackageInfo;->versionCode:I

    iput v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->apkVersionCode:I
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 418
    .end local v1           #pInfo:Landroid/content/pm/PackageInfo;
    :goto_0
    invoke-static {}, Lcom/noshufou/android/su/util/Util;->getSuVersion()Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->binVersion:Ljava/lang/String;

    .line 419
    const/4 v2, 0x0

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    return-object v2

    .line 414
    :catch_0
    move-exception v0

    .line 415
    .local v0, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    const-string v2, "Su.PreferencesActivity"

    const-string v3, "Superuser is not installed?"

    invoke-static {v2, v3, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_0
.end method

.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->doInBackground([Ljava/lang/Void;)Ljava/lang/Integer;

    move-result-object v0

    return-object v0
.end method

.method protected onPostExecute(Ljava/lang/Integer;)V
    .locals 7
    .parameter "result"

    .prologue
    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 424
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    #getter for: Lcom/noshufou/android/su/preferences/PreferencesActivity;->mApkVersion:Landroid/preference/Preference;
    invoke-static {v0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->access$4(Lcom/noshufou/android/su/preferences/PreferencesActivity;)Landroid/preference/Preference;

    move-result-object v0

    iget-object v1, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    const v2, 0x7f0b0079

    const/4 v3, 0x2

    new-array v3, v3, [Ljava/lang/Object;

    iget-object v4, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->apkVersion:Ljava/lang/String;

    aput-object v4, v3, v5

    iget v4, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->apkVersionCode:I

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v3, v6

    invoke-virtual {v1, v2, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setTitle(Ljava/lang/CharSequence;)V

    .line 425
    iget-object v0, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    #getter for: Lcom/noshufou/android/su/preferences/PreferencesActivity;->mBinVersion:Landroid/preference/Preference;
    invoke-static {v0}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->access$5(Lcom/noshufou/android/su/preferences/PreferencesActivity;)Landroid/preference/Preference;

    move-result-object v0

    iget-object v1, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->this$0:Lcom/noshufou/android/su/preferences/PreferencesActivity;

    const v2, 0x7f0b007c

    new-array v3, v6, [Ljava/lang/Object;

    iget-object v4, p0, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->binVersion:Ljava/lang/String;

    aput-object v4, v3, v5

    invoke-virtual {v1, v2, v3}, Lcom/noshufou/android/su/preferences/PreferencesActivity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/preference/Preference;->setTitle(Ljava/lang/CharSequence;)V

    .line 426
    return-void
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Ljava/lang/Integer;

    invoke-virtual {p0, p1}, Lcom/noshufou/android/su/preferences/PreferencesActivity$UpdateVersions;->onPostExecute(Ljava/lang/Integer;)V

    return-void
.end method
